<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.opengis.net/xls" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:xls="http://www.opengis.net/xls" elementFormDefault="qualified" version="1.1.1">
<!--
 Copyright (c) 2006,2010 Open Geospatial Consortium, Inc. All Rights Reserved.
 To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ .
-->
	<import namespace="http://www.opengis.net/gml" schemaLocation="gml4xls.xsd"/>
	<include schemaLocation="XLS.xsd"/>
	<!-- ====================================================== -->
	<element name="GeocodeRequest" type="xls:GeocodeRequestType" substitutionGroup="xls:_RequestParameters">
		<annotation>
			<documentation>Geocode Service Request</documentation>
		</annotation>
	</element>
	<!-- ====================================================== -->
	<complexType name="GeocodeRequestType">
		<annotation>
			<documentation>Geocode Request. </documentation>
		</annotation>
		<complexContent>
			<extension base="xls:AbstractRequestParametersType">
				<sequence>
					<element ref="xls:Address" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ====================================================== -->
	<element name="GeocodeResponse" type="xls:GeocodeResponseType" substitutionGroup="xls:_ResponseParameters">
		<annotation>
			<documentation>Geocode Service Response</documentation>
		</annotation>
	</element>
	<!-- ====================================================== -->
	<complexType name="GeocodedAddressType">
		<sequence>
			<element ref="gml:Point"/>
			<element ref="xls:Address"/>
			<element ref="xls:GeocodeMatchCode" minOccurs="0"/>
			<!--  ref="xls:Point"/> -->
		</sequence>
	</complexType>
	<!-- ====================================================== -->
	<complexType name="GeocodeResponseListType">
		<sequence>
			<element name="GeocodedAddress" type="xls:GeocodedAddressType" maxOccurs="unbounded">
				<annotation>
					<documentation>The list of 1-n addresses that are  returned for each Address request, sorted by Accuracy.</documentation>
				</annotation>
			</element>
		</sequence>
		<attribute name="numberOfGeocodedAddresses" type="nonNegativeInteger" use="required">
			<annotation>
				<documentation>This is the number of responses generated per the different requests. Within each geocoded address tit's possible to have multiple candidates</documentation>
			</annotation>
		</attribute>
	</complexType>
	<element name="GeocodeResponseList" type="xls:GeocodeResponseListType">
		<annotation>
			<documentation>The list of  responses for each of the requested Address ADTs. Each requested address may have 1-n responses (numberOfAddresses). </documentation>
		</annotation>
	</element>
	<complexType name="GeocodeResponseType">
		<annotation>
			<documentation>GeocodeResponse. The addresses returned will be normalized Address ADTs as a result of any parsing by the geocoder, etc.</documentation>
		</annotation>
		<complexContent>
			<extension base="xls:AbstractResponseParametersType">
				<sequence>
					<element ref="xls:GeocodeResponseList" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ====================================================== -->
	<element name="ReverseGeocodeRequest" type="xls:ReverseGeocodeRequestType" substitutionGroup="xls:_RequestParameters">
		<annotation>
			<documentation>Reverse Geocode Service Request</documentation>
		</annotation>
	</element>
	<!-- ====================================================== -->
	<complexType name="ReverseGeocodeRequestType">
		<annotation>
			<documentation>Reverse Geocode Request.</documentation>
		</annotation>
		<complexContent>
			<extension base="xls:AbstractRequestParametersType">
				<sequence>
					<element ref="xls:Position"/>
					<element ref="xls:ReverseGeocodePreference" minOccurs="0" maxOccurs="unbounded"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<!-- ====================================================== -->
	<element name="ReverseGeocodeResponse" type="xls:ReverseGeocodeResponseType" substitutionGroup="xls:_ResponseParameters">
		<annotation>
			<documentation>Reverse Geocode Service Response</documentation>
		</annotation>
	</element>
	<!-- ====================================================== -->
	<complexType name="ReverseGeocodedLocationType">
		<sequence>
			<element ref="gml:Point"/>
			<element ref="xls:Address"/>
			<element ref="xls:SearchCentreDistance" minOccurs="0"/>
			<!-- ref="xls:Point"/> -->
		</sequence>
	</complexType>
	<complexType name="ReverseGeocodeResponseType">
		<annotation>
			<documentation>ADT for a ReverseGeocodeResponse. One or more addresses may be returned</documentation>
		</annotation>
		<complexContent>
			<extension base="xls:AbstractResponseParametersType">
				<sequence>
					<element name="ReverseGeocodedLocation" type="xls:ReverseGeocodedLocationType" minOccurs="0" maxOccurs="unbounded">
						<annotation>
							<documentation>Reverse Geocoder may find 0 to n Point-Address combinations that match.</documentation>
						</annotation>
					</element>
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	<simpleType name="ReverseGeocodePreferenceType">
		<annotation>
			<documentation>Defines a Preference for Reverse Geocode response.  </documentation>
		</annotation>
		<restriction base="string">
			<enumeration value="StreetAddress"/>
			<enumeration value="IntersectionAddress"/>
		</restriction>
	</simpleType>
	<element name="ReverseGeocodePreference" type="xls:ReverseGeocodePreferenceType">
		<annotation>
			<documentation>Describes the preference for what the Reverse Geocoder service should return: StreetAddress, IntersectionAddress, or PositionOfInterest (Place and/or PostalCode). If not specified, then the service will return the nearest StreetAddress. . </documentation>
		</annotation>
	</element>
	<element name="SearchCentreDistance" type="xls:DistanceType">
		<annotation>
			<documentation>Distance of reverse geocoded location from starting position.</documentation>
		</annotation>
	</element>
</schema>
